define([ "Zepto", "underscore", "Backbone", "Handlebars",
﻿  ﻿  "views/common/updateslistitemview" ], function($, _, Backbone, Handlebars, UpdatesListItemView) {

﻿  var UpdatesListView = Backbone.View.extend({

﻿  ﻿  initialize : function() {
﻿  ﻿  ﻿  this.model.bind("reset", this.render, this);
﻿  ﻿  },

﻿  ﻿  render : function(eventName) {
﻿  ﻿  ﻿  //$(this.el).empty();
﻿  ﻿  ﻿  
      _.each(this.model.models, function(item) {
﻿  ﻿  ﻿  ﻿  $(this.el).append(new UpdatesListItemView({
		  tagName : 'div',
		  className : 'bubble-item',
﻿  ﻿  ﻿  ﻿  ﻿  model : item
﻿  ﻿  ﻿  ﻿  }).render().el);
﻿  ﻿  ﻿  }, this);
﻿  ﻿  ﻿  // $('#myList').listview('refresh');
﻿  ﻿  ﻿  return this;
﻿  ﻿  },

// ﻿  ﻿  postRender : function(eventName) {
// ﻿  ﻿  ﻿  var scrollableframe = new iScroll('scrollablebubble', {
// ﻿  ﻿  ﻿  ﻿  useTransition : false,
// ﻿  ﻿  ﻿  ﻿  checkDOMChanges : true,
// ﻿  ﻿  ﻿  ﻿  hideScrollbar : true,
// ﻿  ﻿  ﻿  ﻿  fixedScrollbar : true,
// ﻿  ﻿  ﻿  ﻿  bounceLock : false });
// ﻿  ﻿  },

// ﻿  ﻿  events : {
// ﻿  ﻿  ﻿  'touchstart .bubble-item' : 'over',
// ﻿  ﻿  ﻿  'touchend .bubble-item' : 'left',
// ﻿  ﻿  ﻿  'touchcancel .bubble-item' : 'left',
// ﻿  ﻿  },

// ﻿  ﻿  over : function(event) {
// ﻿  ﻿  ﻿  $(event.currentTarget).addClass('fake-active');
// ﻿  ﻿  },

// ﻿  ﻿  left : function(event) {
// ﻿  ﻿  ﻿  $(event.currentTarget).removeClass('fake-active');
// ﻿  ﻿  }
﻿  });

﻿  return UpdatesListView;

});